//
//  SearchExpress.m
//  TengyunStation
//
//  Created by Johnny on 15/9/1.
//  Copyright (c) 2015年 xingrong. All rights reserved.
//

#import "SearchExpress.h"
#import "SocketMethod.h"

@implementation SearchExpress

- (id)initWithString:(NSString *)string {
    self = [super init];
    if (self) {
        NSArray *array = [string componentsSeparatedByString:@","];
        self.expressCompanyId = [SocketMethod subArray:array Index:0];
        self.expressCompanyName = [SocketMethod subArray:array Index:1];
        self.expressId = [SocketMethod subArray:array Index:2];
        self.inwayExpressId = [SocketMethod subArray:array Index:3];
        self.telephone = [SocketMethod subArray:array Index:4];
        self.positon = [SocketMethod subArray:array Index:5];
        self.address = [SocketMethod subArray:array Index:6];
        self.expressType = [SocketMethod subArray:array Index:7];
        self.smsType = [[SocketMethod subArray:array Index:8] intValue];
        self.receiveTime = [SocketMethod subArray:array Index:9];
        self.signinTime = [SocketMethod subArray:array Index:10];
        self.retreatTime = [SocketMethod subArray:array Index:11];
        self.isOverdue = [[SocketMethod subArray:array Index:12] intValue];
        self.remark = [SocketMethod subArray:array Index:13];
    }
    return self;
}

- (void)setReceiveTime:(NSString *)receiveTime {
    _receiveTime = [SocketMethod dateStringWithDateString:receiveTime];
}

- (void)setSigninTime:(NSString *)signinTime {
    _signinTime = [SocketMethod dateStringWithDateString:signinTime];
}

- (void)setRetreatTime:(NSString *)retreatTime {
    _retreatTime = [SocketMethod dateStringWithDateString:retreatTime];
}

@end
